package com.ruoyi.cs.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.ruoyi.common.core.domain.Response;
import com.ruoyi.cs.domain.TGoods;
import com.ruoyi.cs.domain.TUser;
import com.ruoyi.cs.domain.vo.*;
import com.ruoyi.common.core.domain.AjaxResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 饰品信息Service接口
 * 
 * @author ruoyi
 * @date 2021-03-25
 */
public interface ITGoodsService 
{
    /**
     * 查询饰品信息
     * 
     * @param goodsId 饰品信息ID
     * @return 饰品信息
     */
    public TGoods selectTGoodsById(String goodsId);

    /**
     * 查询饰品信息列表
     * 
     * @param tGoods 饰品信息
     * @return 饰品信息集合
     */
    public List<TGoods> selectTGoodsList(TGoods tGoods);

    /**
     * 新增饰品信息
     * 
     * @param tGoods 饰品信息
     * @return 结果
     */
    public int insertTGoods(TGoods tGoods);

    /**
     * 修改饰品信息
     * 
     * @param tGoods 饰品信息
     * @return 结果
     */
    public Response updateTGoods(TGoods tGoods);

    /**
     * 批量删除饰品信息
     * 
     * @param goodsIds 需要删除的饰品信息ID
     * @return 结果
     */
    public Response deleteTGoodsByIds(String[] goodsIds);

    /**
     * 删除饰品信息信息
     * 
     * @param goodsId 饰品信息ID
     * @return 结果
     */
    public int deleteTGoodsById(String goodsId);

    /**
     * 批量停用饰品信息
     * @param goodsIds
     * @return
     */
    public Response batchStopTGoods(String[] goodsIds);

    /**
     * 批量启用饰品信息
     * @param goodsIds
     * @return
     */
    public Response batchEnableTGoods(String[] goodsIds);


    /**
     * 获取幸运饰品列表下的饰品列表
     * @param tGoodsVo
     * @return
     */
    public List<TGoods> luckyJewelryList(TGoodsVo tGoodsVo);

    /**
     * 幸运饰品升级操作
     * @param tGoodsVo
     * @return
     */
    public Response<LuckyGoodsUpgrateResp> luckyGoodsUpgrateV2(TGoodsUpgrateVo tGoodsVo,String userId);
    /**
     * 后台饰品管理列表
     * @param tGoods
     * @return
     */
    public List<TGoods> goodsListBack(TGoods tGoods);

    public int updateTGoodsStockStatus( String goodsId, String goodsStockStatus);


    public List<TGoods> boxGoodsList(String goodsBelongingType, String goodsBelongingId);


    public List<TGoods> boxTGoodsList(String goodsBelongingType, String goodsBelongingId);

    /**
     * 批量添加
     * @param vo
     * @return
     */
    public Response batchAdd (TGoodsAddVo vo);

    public Map<String, BigDecimal> luckyCount(String startTime,String endTime);

    /**
     * 幸运饰品列表
     * @param tGoods
     * @return
     */
    public List<LuckyTGoodsVo> luckyGoodsListBack(LuckyTGoodsVo tGoods);

    /**
     * 保底饰品列表
     * @param tGoods
     * @return
     */
    public List<TGoods> floorsGoodsListBack(TGoods tGoods);

    /**
     * 保底饰品添加
     * @param tGoods
     * @return
     */
    public Response floorsTGoodsAdd(TGoods tGoods);


    public Response floorsTGoodsBattleAdd(TGoods tGoods);


    /**
     * 保底饰品编辑
     * @param tGoods
     * @return
     */
    public Response floorsTGoodsEdit(TGoods tGoods);


    /**
     * 溢价设置
     * @param val
     * @param type
     * @return
     */
    public int premiumSet(String type,String val);

    /**
     * 默认保底饰品设置
     * @param goodsId
     * @return
     */
    public String defaultTGoodsSet(String goodsId);


    public Response floorsTGoodsEditBattle(TGoods tGoods);

    public String defaultTGoodsSetBattle(String goodsId);

    public List<TGoods> shoppingMallList(TGoodsVo tGoods);

    public Response shoppingBuy(ShoppingVo shoppingVo)  throws Exception ;

    public Map<String, Object> shoppingMallCount();

    public  List<TGoodsShoppingBackVo> shoppingMallListBack(TGoodsShoppingBackVo tGoodsShoppingBackVo);

    public Response shoppingMallAdd(@RequestBody TGoodsShoppingBackVo tGoodsShoppingBackVo);

    public Response shoppingMallUpdate(@RequestBody TGoodsShoppingBackVo tGoodsShoppingBackVo);

    public  List<TBackPackShoppingBackVo> shoppingMallBuyList(TBackPackShoppingBackVo tBackPackShoppingBackVo);

    public int editDelfalg(String goodsId,String delFlag);

    /**
     * 更新饰品池价格
     */
    public Response updateGoodsPoolPrice(String type,List<String> boxIds);

    /**
     * 修改幸运饰品溢价值
     * @param premiumRate
     * @param goodsbelongingtype
     * @return
     */
    public int updatePremiumRate(String premiumRate, String goodsbelongingtype);

    /**
     * 默认排雷保底饰品编辑
     * @param goodsId
     * @return
     */
    public TGoods defaultTGoodsSetMineClear(String goodsId);


    /**
     * @Desc: 更新箱子价格和饰品品级
     * @author: zz
     * @date: 2024/2/5
     */
    public void batchUpdateBoxPrice(List<String> boxIds);


    /**
     * @Desc: 全量更新箱子价格以及箱子饰品信息
     * @author: zz
     * @date: 2024/2/6
     */
    public void updateBoxInfo();

}
